// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/16/2015 7:30:51 PM				
// -----------------------------

#ifndef _WindowEventHandler_h
#define _WindowEventHandler_h

#include "Common.h"

using namespace Windows::Foundation;
using namespace Windows::Foundation::Metadata;
using namespace Windows::UI::Core;
using namespace Platform;


ref class WindowEventHandler
{
public:

	static property Bool			IsAlive;
	static property Bool			IsVisible;
	static property CoreWindow^		Window;

	static void	RegisterEvents(CoreWindow^ refWindow);
	static void	Dispatch(CoreProcessEventsOption option);

protected:

	static void OnActivated(CoreWindow ^sender, WindowActivatedEventArgs ^args);
	static void OnClosed(CoreWindow ^sender, CoreWindowEventArgs ^args);
	static void OnVisibilityChanged(CoreWindow ^sender, VisibilityChangedEventArgs ^args);

private:

	WindowEventHandler();

};

#endif